﻿using System;
using System.Collections.Generic;

namespace SlamCms.Caching
{
	public interface ICacheManager
	{
		bool Contains(string key, bool allowDirty = true);
		T Get<T>(string key, bool allowDirty = true) where T : class;
		void Save<T>(string key, T instance, TimeSpan? timeout = null, bool sliding = false) where T : class;
		void Remove(string key);
		IEnumerable<string> Keys { get; }
	}
}